function plotrocks(filenumber)
figure(1); clf; hold on;
for count=filenumber
    
    N=readdata(count,1);
    S=readdata(count,2);
    T=readdata(count,3);
%     multigridlevels=readdata(count,4);
%     bound=readdata(count,5);
    time=readdata(count,6);
%     dtnom=readdata(count,7);
    dx=readdata(count,8);
    dz=readdata(count,9);
%    mx=readdata(count,10);
%    mz=readdata(count,11);
%     mcs=readdata(count,12);
%     mct=readdata(count,13);
%    mtype=readdata(count,14);
    %mTemp=readdata(count,15);
    %mstressxx=readdata(count,16);
    %mstressxz=readdata(count,17);
    %mstrainxx=readdata(count,18);
    %mstrainxz=readdata(count,19);
    %mfinitestrain=readdata(count,20);
%     vx=readdata(count,21);
%     vz=readdata(count,22);
     %P=readdata(count,23);
     Nsurfaces=readdata(count,24);
     surfaces=readdata(count,25);

    x=zeros(1,S); z=zeros(1,T); 
    for s=1:S-1 x(s+1)=x(s)+dx(s); end
    for t=1:T-1 z(t+1)=z(t)+dz(t); end
    
    
    sealevel=0.5*(surfaces(1,2)+surfaces(S,2));
    surface=surfaces(:,1)-4e4;
    plot(x,surface,'r'); set(gca,'ydir','rev'); %axis([0 1000000 -5000 10000]);
    %print(gcf, '-djpeg100',['..\outfiles\surface' num2str(count)]); clf;
    time/(60*60*365*24)
    pause(0.1);
    
 
end
end